package com.itheima.feign.client;

import com.itheima.feign.config.DefaultFeignConfiguration;
import com.itheima.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 29143
 */
@FeignClient(value = "userservice",configuration = DefaultFeignConfiguration.class)  // 定义当前接口时feign客户端  并且指定要调用的服务名称
public interface UserClient {

    @GetMapping("/user/{id}")
    public User fiandById(@PathVariable("id") Long id);
}
